<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Realm - Users</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="Bluth Company">
    <link rel="shortcut icon" href="/AppStore/Public/assets/ico/favicon.html">
    <link href="/AppStore/Public/assets/css/bootstrap.css" rel="stylesheet">
    <link href="/AppStore/Public/assets/css/theme.css" rel="stylesheet">
    <link href="/AppStore/Public/assets/css/font-awesome.min.css" rel="stylesheet">
    <link href="/AppStore/Public/assets/css/alertify.css" rel="stylesheet">
    <link rel="/AppStore/Public/assets/ico/Favicon Icon" href="favicon.ico">
    <link href="http://fonts.useso.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<body>
<div id="wrap">
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container-fluid">
                <div class="logo">
                    <img src="/AppStore/Public/assets/img/logo.png" alt="Realm Admin Template">
                </div>
                <a class="btn btn-navbar visible-phone" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <a class="btn btn-navbar slide_menu_left visible-tablet">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>

                <div class="top-menu visible-desktop">
                    <ul class="pull-left">
                        <li><a id="messages" data-notification="2" href="#"><i class="icon-envelope"></i> Messages</a></li>
                        <li><a id="notifications" data-notification="3" href="#"><i class="icon-globe"></i> Notifications</a></li>
                    </ul>
                    <ul class="pull-right">
                        <li><a href="login.html"><i class="icon-off"></i> Logout</a></li>
                    </ul>
                </div>

                <div class="top-menu visible-phone visible-tablet">
                    <ul class="pull-right">
                        <li><a title="link to View all Messages page, no popover in phone view or tablet" href="#"><i class="icon-envelope"></i></a></li>
                        <li><a title="link to View all Notifications page, no popover in phone view or tablet" href="#"><i class="icon-globe"></i></a></li>
                        <li><a href="login.html"><i class="icon-off"></i></a></li>
                    </ul>
                </div>

            </div>
        </div>
    </div>

    <div class="container-fluid">

        <!-- Side menu -->
        <div class="sidebar-nav nav-collapse collapse">
            <div class="user_side clearfix">
                <img src="/AppStore/Public/assets/img/odinn.jpg" alt="Odinn god of Thunder">
                <h5>Odinn</h5>
                <a href="#"><i class="icon-cog"></i> Settings</a>
            </div>
            <div class="accordion" id="accordion2">
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_F79999" href="index-2.html"><i class="icon-dashboard"></i> <span>Dashboard</span></a>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_C3F7A7 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#collapse1"><i class="icon-magic"></i> <span>Features</span></a>
                    </div>
                    <div id="collapse1" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="ui_features.html"><i class="icon-star"></i> UI Features</a>
                            <a class="accordion-toggle" href="forms.html"><i class="icon-list-alt"></i> Forms</a>
                            <a class="accordion-toggle" href="tables.html"><i class="icon-table"></i> Tables</a>
                            <a class="accordion-toggle" href="buttons.html"><i class="icon-circle"></i> Buttons</a>
                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#collapse2"><i class="icon-reorder"></i> <span>Components</span></a>
                    </div>
                    <div id="collapse2" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="notifications.html"><i class="icon-rss"></i> Notifications</a>
                            <a class="accordion-toggle" href="calendar.html"><i class="icon-calendar"></i> Calendar</a>
                            <a class="accordion-toggle" href="gallery.html"><i class="icon-picture"></i> Gallery</a>
                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_F6F1A2" href="tasks.html"><i class="icon-tasks"></i> <span>Tasks</span></a>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_C1F8A9" href="analytics.html"><i class="icon-bar-chart"></i> <span>Analytics</span></a>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_9FDDF6" href="tickets.html"><i class="icon-bullhorn"></i> <span>Support Tickets</span></a>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse3"><i class="icon-user"></i> <span>用户管理</span></a>
                    </div>
                    <div id="collapse3" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="add"><i class="icon-user"></i>添加用户</a>
                            <a class="accordion-toggle" href="calendar.html"><i class="icon-calendar"></i> Calendar</a>
                            <a class="accordion-toggle" href="gallery.html"><i class="icon-picture"></i> Gallery</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /Side menu -->

        <!-- Main window -->
        <div class="main_container" id="users_page">

            <div class="row-fluid">
                <ul class="breadcrumb">
                    <li><a href="#">Home</a> <span class="divider">/</span></li>
                    <li><a href="#">Pages</a> <span class="divider">/</span></li>
                    <li class="active">APP管理</li>
                </ul>
                <h2 class="heading">
                    APP管理
                    <div class="btn-group pull-right">
                        <button class="btn"><i class="icon-download-alt"></i> Export</button>
                        <button class="btn"><i class="icon-envelope"></i> Email</button>
                        <button class="btn"><i class="icon-cog"></i> Settings</button>
                    </div>
                </h2>
            </div> <!-- /row-fluid -->
            <div class="row-fluid">
                <div class="widget widget-padding span12">
                    <div class="widget-header">
                        <i class="icon-group"></i>
                        <h5>APP管理</h5>
                        <div class="widget-buttons">
                            <a href="#" data-title="Add User" data-toggle="modal" data-target="#example_modal"><i class="icon-plus"></i></a>
                            <a href="#" data-title="Collapse" data-collapsed="false" class="collapse"><i class="icon-chevron-up"></i></a>
                        </div>
                    </div>
                    <div class="widget-body">
                        <table id="users" class="table table-striped table-bordered dataTable">
                            <thead>
                            <tr>
                                <td>图标</td>
                                <td>APP名</td>
                                <td>上传时间</td>
                                <td>编辑时间</td>
                                <td>发明者</td>
                                <td>发布者</td>
                                <td>简介</td>
                                <td>详细介绍</td>
                                <td>APP大小</td>
                                <td>操作</td>

                            </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($apps)): $i = 0; $__LIST__ = $apps;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                                    <td><img src="/AppStore/Public/Uploads/photo/<?php echo ($vo["logo"]); ?>" width="100px"height="100px"></td>
                                    <!--_public_自动对应文件夹-->
                                    <td><?php echo ($vo["name"]); ?></td>
                                    <!--<?php echo ($vo['username']); ?>-->
                                    <td><?php echo ($vo["uptime"]); ?></td>
                                    <td><?php echo ($vo["edittime"]); ?></td>
                                    <td><?php echo ($vo["developer"]); ?></td>
                                    <td><?php echo ($vo["upuser"]); ?></td>
                                    <td><?php echo ($vo["briefintro"]); ?></td>
                                    <td><?php echo ($vo["intro"]); ?></td>
                                    <td><?php echo ($vo["size"]); ?></td>
                                    <td>
                                        <div class="btn-group">
                                            <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                                                操作
                                                <span class="caret"></span>
                                            </a>
                                            <ul class="dropdown-menu pull-right">
                                                <li><a href="updateappInfo?id=<?php echo ($vo["id"]); ?>"><i class="icon-envelope"></i>修改</a></li>
                                                <li><a href="delapp?id=<?php echo ($vo["id"]); ?>"><i class="icon-edit"></i>删除</a></li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                            </tbody>
                        </table>
                    </div> <!-- /widget-body -->
                </div> <!-- /widget -->
            </div> <!-- /row-fluid -->

        </div>
        <!-- /Main window -->

    </div><!--/.fluid-container-->
</div><!-- wrap ends-->

<!-- Example Modal -->
<div id="example_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">Add user/employee</h3>
    </div>
    <form class="form-horizontal"  method="post" action="addApp" enctype="multipart/form-data">
        <div class="modal-body">
            //添加APP
            <div class="container">
                <input type="hidden" name="id">
                <div class="form-group">
                    <label for="name"class="col-sm-2 control-label">APP名</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control" id="name"name="name" placeholder="请输入名称">
                    </div>
                </div>
                <div class="form-group">
                    <label for="developer" class="col-sm-2 control-label">发明者</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control" id="developer" name="developer"placeholder="请输入发明者">
                    </div>
                </div>
                <div class="form-group">
                    <label for="upuser"class="col-sm-2 control-label">发布者</label>
                    <div class="col-sm-5">
                        <input type="upuser" class="form-control" id="upuser"name="upuser" placeholder="请输入发布者">
                    </div>
                </div>
                <div class="form-group">
                    <label for="briefintro"class="col-sm-2 control-label">简介</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control" id="briefintro" name="briefintro" placeholder="请输入简介">
                    </div>
                </div>
                <div class="form-group">
                    <label for="intro"class="col-sm-2 control-label">详细介绍</label>
                    <div class="col-sm-5">
                        <textarea class="form-control" rows="3" type="text"  id="intro" name="intro"placeholder="请输入详细介绍"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="verifyinfo"class="col-sm-2 control-label">审核信息</label>
                    <div class="col-sm-5">
                        <textarea class="form-control" rows="3" type="text"  id="verifyinfo" name="verifyinfo"placeholder="请输入审核信息"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">状态</label>
                    <div class="col-sm-5">
                        <label class="radio-inline">
                            <input type="radio" id="inlineRadio1" value="0"name="state"checked> 禁用
                        </label>
                        <label class="radio-inline">
                            <input type="radio" id="inlineRadio2" value="1"name="state"> 正常
                        </label>
                        <label class="radio-inline">
                            <input type="radio" id="inlineRadio3" value="2"name="state"> 禁言
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label for="logo" class="col-sm-2 control-label">修改文件</label>
                    <div class="col-sm-2">
                        <input type="file" id="logo" name="logo">
                    </div>
                </div>

            </div>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
            <button class="btn btn-primary"type="submit">Save changes</button>
        </div>
    </form>
</div>


</div>

<script type="text/javascript" src="/AppStore/Public/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/raphael-min.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/bootstrap.js"></script>
<script type="text/javascript" src='/AppStore/Public/assets/js/sparkline.js'></script>
<script type="text/javascript" src='/AppStore/Public/assets/js/morris.min.js'></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/jquery.masonry.min.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/jquery.imagesloaded.min.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/jquery.facybox.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/jquery.alertify.min.js"></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/jquery.knob.js"></script>
<script type='text/javascript' src='/AppStore/Public/assets/js/fullcalendar.min.js'></script>
<script type='text/javascript' src='/AppStore/Public/assets/js/jquery.gritter.min.js'></script>
<script type="text/javascript" src="/AppStore/Public/assets/js/realm.js"></script>
</body>
</html>